<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="root">
			<school></school>
		</div>
		<script type="text/javascript">
		Vue.prototype.x=99
			const school = Vue.extend({
				template: `
					<div>
						<h2>学校名称:{{name}}</h2>
						<h2>学校地址:{{address}}</h2>
						<button @click="showX">点我输出x</button>
					</div>
				`,
				data() {
					return {
						name: '老八汉堡店',
						address: '厕所'
					}
				},
				methods:{
					showX(){
						console.log(this.x);
					}
				}
			})
			const vm = new Vue({
				el: '#root',
				data: {
					msg:'你好'
				},
				components:{
					school
				}
			})
			console.log(school.prototype.__proto__ === Vue.prototype);

			/* function Demo(){
				this.a=1
				this.b=2
			}
			const d=new Demo()
			console.log(Demo.prototype);
			console.log(d.__proto__);
			Demo.prototype.x=99
			console.log(d.x); */
		</script>
	</body>
</html>
